﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace BaiDuSitemap.DBO
{
    public class Code
    {
        public static DataTable getAllFrequency()
        {
            string sql = "select [id],[frequency] from [QT_Code_Frequency] order by [id] asc";
            return new QT.DBO.OleDBHelper(myDB.connstring).DataTable(sql);
        }

        public static string getID(string freq)
        {
            string sql = "select [id] from [QT_Code_Frequency] where [Frequency]='" + freq + "'";
            DataTable dt = new QT.DBO.OleDBHelper(myDB.connstring).DataTable(sql);
            if (dt.Rows.Count > 0) return dt.Rows[0][0].ToString();
            else return "0";
        }
    }
}
